package ca.seia.comp6521.a2.hashstorage;

public class HashBucketController {
	
	private HashBitVector[] hashBitVectors;
	
	public HashBucketController(HashBitVector[] hashBitVectors) {
		this.hashBitVectors = hashBitVectors;
	}

	public boolean shouldAddCount(int item1,int item2 ) {
		boolean pairHashesInAllFrequentHashBuckets = true;
		for(HashBitVector hashBitVector: hashBitVectors) {
			if(!hashBitVector.isBucketFrequent(item1, item2)) {
				pairHashesInAllFrequentHashBuckets = false;
				break;
			}
		}
		return pairHashesInAllFrequentHashBuckets;
	}
}
